#include "postmessagestatusrequest.h"
#include "response/postmessagestatusresponse.h"


#include <QUrl>


PostMessageStatusRequest::PostMessageStatusRequest(const QString &messageStatus,
                                                   const QString &sessionKey):
    m_response(new PostMessageStatusResponse()),
    m_messageStatus(messageStatus),
    m_sessionKey(sessionKey)
{
}


PostMessageStatusRequest::~PostMessageStatusRequest()
{
    delete m_response;
    m_response = 0;
}


const Network::JSONResponse &PostMessageStatusRequest::jsonResponse() const
{
    return *m_response;
}


QUrl PostMessageStatusRequest::url() const
{
    QString url = QString("http://dev.mapi2.me.zing.vn/frs/mapi2/feed?method=feed.userupdatestatus&session_key=%1&status=%2")
            .arg(m_sessionKey).arg(m_messageStatus);
    return QUrl(url);
}


Network::JSONResponse &PostMessageStatusRequest::jsonResponse()
{
    return *m_response;
}
